package com.lzs.Service.Impl;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.lzs.DAO.PartdetailDAO;
import com.lzs.PO.Member;
import com.lzs.PO.Partdetail;
import com.lzs.Service.PartdetailService;

@Service
public class PartdetailServiceImpl implements PartdetailService {
@Autowired
PartdetailDAO partdetailDAO;
	
	public Member findPartdetailByRuralId(String rural_id) {
		
		Member memberlistWithPart = this.partdetailDAO.findPartdetailByRuralId(rural_id);
		return memberlistWithPart;
	}

	
	public void addPart(Map<String,Object> map) {
		
		this.partdetailDAO.addPart(map);
		
	}


	
	public void addPartdetail(Map<String, Object> map) {
		
		this.partdetailDAO.addPartdetail(map);
		
	}


	@Override
	public Partdetail findPartdetailByRuralIdAndYear(String rural_id, String year) {
		
		Partdetail partdetail = this.partdetailDAO.findPartdetailByRuralIdAndYear(rural_id,year);
		
		return partdetail;
	}

}
